﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;

namespace Wolfy.NetDisk.Core.Model
{
    public class File : DeleteEntity
    {
        /// <summary>
        /// 文件名称
        /// </summary>
        public string Name { set; get; }
        /// <summary>
        /// 文件的md5值
        /// </summary>
        public string Md5 { set; get; }
        /// <summary>
        /// 文件扩展名
        /// </summary>
        public string Ext { set; get; }

        /// <summary>
        /// 文件存放相对路径
        /// </summary>
        public string Path { set; get; }
        /// <summary>
        /// 文件大小
        /// </summary>
        public long Size { set; get; }
        /// <summary>
        /// 图标信息
        /// </summary>
        [Required]
        public virtual Icon Icon { set; get; }
        /// <summary>
        /// 一个文件存在一个文件夹中
        /// </summary>
        public virtual Folder Folder { set; get; }
        /// <summary>
        /// 添加及修改时间
        /// </summary>
        public DateTime Dt { set; get; }
        /// <summary>
        /// 文件属于用户
        /// </summary>
        public virtual User User { set; get; }
    }
}
